﻿using NLua;
using System;
using System.Diagnostics;
using System.Reflection;

namespace Ensemble_Windows
{
    public class LuaHelper
    {
        /// <summary>
        /// 加载Lua文件
        /// </summary>
        /// <param name="type">类型</param>
        /// <param name="path">文件</param>
        public static void LoadScript<T>(string path, Lua lua ,object type)
        {
            object[] result = lua.DoFile(path);
            if (result != null)
            {
                type = (T)result[0];
            }
        }
    }
}
